package syntelos.sx;

import alto.lang.Date;
import alto.lang.Message;

/**
 * 
 */
public final class LogSC
    extends syntelos.lang.Message.Queue
{
    protected final Server server;

    public LogSC(Message.Queue queue, Server server){
        super(queue,server.getServerReferenceClose());
        this.server = server;
    }

    public void formatMessage()
        throws java.io.IOException
    {
        this.resetall();
        Server server = this.server;
        String reference = SafeEmpty(this.getReferenceString());
        this.println("<log type=\"server\" event=\"close\" protocol=\""+server.getProtocol()+"\" port=\""+server.getPort()+"\" name=\""+server.getName()+"\" date=\""+Date.ToString()+"\" reference=\""+reference+"\"/>");
    }
}
